#ifndef PATHMAP_H
#define PATHMAP_H

#include "micropather.h"
#include <stdio.h>

using namespace micropather;
class PathMap : public Graph
{
public:
    PathMap(int width, int height);
    ~PathMap();
    virtual float LeastCostEstimate(void *stateStart, void *stateEnd);
    virtual void AdjacentCost(void *state, std::vector<micropather::StateCost> *adjacent);
    virtual void PrintStateInfo(void *state);
    void SetPointPassable(int x, int y, bool isPassable);
    bool IsPointPassable(int x, int y);
    void StateToXY(void *state, int &x, int &y);
    void* XYToState(int x, int y);
    int getWidth();
    int getHeight();

private:
    int width, height;
    bool* isPassableMap;
    bool IsPointValid(int x, int y);
    void AddStateCostIfValid(int x, int y, float cost, std::vector<micropather::StateCost> *adjacent);
};

#endif // PATHMAP_H
